package com.hex.ds.hdtp.core.app.common.enums;

import lombok.Getter;

/**
 * @Package com.hex.ds.hdtp.core.app.common.enums
 * @ClassName CrossDbContrastResultContrastType
 * @Description 数据比对各类比对枚举
 * @Author gj.xu
 * @Date 2024/3/4 17:46
 * @Version v2.0
 **/
@Getter
public enum CrossDbContrastResultContrastType {

    // 表结构对比
    IS_CREATE_TABLE("isCreateTable", "是否建表"),
    IS_FIELD_COUNT("isFieldCount", "是否对比字段总数"),
    IS_FIELD_NAME("isFieldName", "是否对比字段名"),
    IS_CONTRAST_PARTITION_FIELD("isContrastPartitionField", "是否比对分区字段"),
    IS_CONTRAST_FIELD_TYPE("isContrastFieldType", "是否比对字段类型"),
    IS_CONTRAST_FIELD_LENGTH("isContrastFieldLength", "是否比对字段长度"),
    IS_CONTRAST_FIELD_PRECISION("isContrastFieldPrecision","是否比对字段精度"),
    ENCODING_FORMAT("EncodingFormat","编码格式"),


    // 汇总数据对比
    IS_HAS_DATA("isHasData", "是否存在数据"),

    WHERE_CONDITION("whereCondition","where条件"),

    REMOVE_REPEAT_COUNT_FIELD("removeRepeatCountField", "指定字段去重count"),
    GROUP_COUNT_FIELD("groupCountField", "指定分组字段 count"),
    COUNT_FIELD("countField", "指定字段 count"),
    SUM_FIELD("sumField", "指定字段 sum"),
    TRIM_FIELD("trimField", "指定字段trim"),
    CUSTOM_SQL("customSQL", "自定义sql"),
    IS_STATISTICS_DATACOUNT("isStatisticsDataCount", "全表COUNT"),
    IS_SUM_CHAR_LENGTH("isSumCharLength", "字符字段长度Sum"),
    IS_SUM_CHAR_TRIM_LENGTH("isSumCharTrimLength", "字符字段长度TrimSum"),
    IS_STATISTICS_NUMBER_SUM("isStatisticsNumberSum", "数字字段Sum"),

    IS_CHAR_LENGTH_MAX("isMaxCharLength","字符lengthMax"),

    // 全字段明细数据对比
    IS_ALL_FIELD("isAllField", "全字段明细"),
    //字符NULL转换空
    IS_CHAR_NULL_TO_EMPTY("isCharNullToEmpty", "字符NULL转换空"),
    //数值NULL转换为0
    IS_NUMBER_NULL_TO_ZERO("isNumberNullToZero", "数值NULL转换为0");

    private String value;
    private String name;

    private CrossDbContrastResultContrastType(String name, String value) {
        this.value = value;
        this.name = name;
    }

}
